// FilerFrogRedoLastDesktopSort.cpp : Defines the entry point for the application.
//
#include <windows.h>
#include "..\FilerFrogShell\ExternalFrogOperations.h"
#include <iostream>

using namespace std;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	if (AllocConsole())
	{
		freopen("CONOUT$", "wt", stdout);
		SetConsoleTitle(L"Debug Console");
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);
	}

	InstallHook();

	MSG msg;

	while(GetMessage(&msg, NULL, 0, 0) > 0)
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	RemoveHook();

	ExternalFrogOperations externalFrogOperations;
	externalFrogOperations.RedoLastDesktopSort();
	return 0;
}
